<?php include('find.php') ?>

<?php echo form_open('jadwal/update') ?>
<table class="data">
    <tr>
        <td>No</td>
        <td>Flight</td>
        <td>Berangkat</td>
        <td>Sampai</td>
        <!--<td>Class</td>-->
        <!--<td>Seat(s)</td>-->
        <!--<td>infant</td>-->
        <!--<td>Harga Tiket</td>-->
        <td>Aksi</td>
    </tr>
    <?php $options = array('K' => 'K', 'N' => 'N', 'Q' => 'Q', 'W' => 'W') ?>
    <?php foreach ($jadwals->result() as $jadwal): ?>
        <tr>
            <td><?php echo $i ?></td>
            <td><b><?php echo get_airlines($id_maskapai) ?></b> <?php echo form_input('flight[]', $jadwal->flight, "style='width:80'") ?></td>
            <td><?php echo form_input('depart[]', $jadwal->depart, "style='width:55'") ?></td>
            <td><?php echo form_input('arrives[]', $jadwal->arrives, "style='width:55'") ?></td>
            <!--<td><?php // echo form_dropdown('class[]', $options, $jadwal->class); ?></td>-->
            <!--<td><?php // echo form_input('adult[]', $jadwal->adult, "style='width:30'"); ?></td>-->
            <!--<td><?php // echo form_input('infant[]', $jadwal->infant, "style='width:80'") ?></td>-->
            <!--<td><?php // echo form_input('price[]', $jadwal->price, "style='width:80'") ?></td>-->

            <?php echo form_hidden('id[]', $jadwal->id) ?>
            <?php echo form_hidden('id_maskapai[]', $id_maskapai) ?>
            <?php echo form_hidden('from[]', $from) ?>
            <?php echo form_hidden('to[]', $to) ?>
            <?php // echo form_hidden('date[]', $date) ?>

            <td><?php echo get_delete_jadwal(1, 'jadwal/delete/', $jadwal->id . '-' . $id_maskapai . '-' . $from . '-' . $to) ?></td>
        </tr>
        <?php $i++; ?>
    <?php endforeach ?>
</table> 
<?php echo form_submit('submit', 'Update', 'class=button') ?>


<?php echo form_close() ?>
<hr />
<?php include('harga.php') ?>
<hr />
<?php echo form_open('jadwal/create') ?>
<table class="data">
    <tr>
        <td>No</td>
        <td>Flight</td>
        <td>Berangkat</td>
        <td>Sampai</td>
        <!--<td>Class</td>-->
        <!--<td>Seat(s)</td>-->
<!--        <td>infant</td>
        <td>Harga Tiket</td>-->
        
    </tr>
    <?php for ($i = 1; $i <= $jumlah; $i++): ?>
        <tr>
            <td><?php echo $i ?></td>
            <td><b><?php echo get_airlines($id_maskapai) ?></b> <?php echo form_input('flight[]', '', "style='width:80'") ?></td>
            <td><?php echo form_input('depart[]', '', "style='width:55'") ?></td>
            <td><?php echo form_input('arrives[]', '', "style='width:55'") ?></td>
            <td><?php // echo form_dropdown('class[]', $options); ?></td>
            <td><?php // echo form_input('adult[]', $adult, "style='width:30'"); ?></td>
            <td><?php // echo form_input('infant[]', $infant, "style='width:80'") ?></td>
            <td><?php // echo form_input('price[]', $price, "style='width:80'") ?></td>
            <?php echo form_hidden('id_maskapai[]', $id_maskapai) ?>
            <?php echo form_hidden('from[]', $from) ?>
            <?php echo form_hidden('to[]', $to) ?>
            <?php // echo form_hidden('date[]', $date) ?>
        </tr>
    <?php endfor ?>
</table> 
<?php echo form_submit('submit', 'Create', 'class=button') ?>
<?php echo form_close() ?>
